package com.yachang.qym.usbhost.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yachang.qym.usbhost.R;
import com.yachang.qym.usbhost.model.AreaModel;
import com.yachang.qym.usbhost.utils.AllData;

import java.util.List;

/**
 * Created by qinyuanmao on 16/1/8.
 */
public class RouteAdapter extends RecyclerView.Adapter<RouteAdapter.RouteViewHolder>{

    private Context mContext;
    private List<AreaModel> areaModels;

    public RouteAdapter(Context context){
        mContext = context;
        areaModels = AllData.areaModels;
    }

    @Override
    public RouteViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        RouteViewHolder holder = new RouteViewHolder(LayoutInflater.from(
                mContext).inflate(R.layout.item_route, parent,
                false));
        return holder;
    }

    @Override
    public void onBindViewHolder(RouteViewHolder holder, int position) {

    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public int getItemCount() {
        return 5;
    }

    public class RouteViewHolder extends RecyclerView.ViewHolder {

        public TextView routeName;
        public TextView callerName;
        public TextView callStyle;
        public RouteViewHolder(View itemView) {
            super(itemView);
            routeName = (TextView) itemView.findViewById(R.id.tv_route_name);
            callerName = (TextView) itemView.findViewById(R.id.tv_caller_name);
            callStyle = (TextView) itemView.findViewById(R.id.tv_call_style);
        }
    }
}
